import request from '/@/utils/request'

const api = 'api'

// 获取
export function getList(params: any) {
  return request({
    url: `${api}/city`,
    method: 'get',
    params,
  })
}

// 增加
export function addApi(data: any) {
  return request({
    url: `${api}/city`,
    method: 'post',
    data,
  })
}

// 修改
export function updateApi(data: any) {
  return request({
    url: `${api}/city/${data.id}`,
    method: 'put',
    data,
  })
}

// 删除
export function deleteApi(id: string | number) {
  return request({
    url: `${api}/city/${id}`,
    method: 'delete',
  })
}
